'
该场景为游戏主菜单，也是进入游戏后第一个进入的场景
'

extends CanvasLayer

@onready var options_meau: CanvasLayer = $OptionsMeau

#绑定按钮
func _ready() -> void:
	%PlayButton.pressed.connect(on_play_pressed)
	%OptionsButton.pressed.connect(on_options_pressed)
	%QuitButton.pressed.connect(on_quit_pressed)
	%UpgradeButton.pressed.connect(on_upgrade_pressed)
	$OptionsMeau.hide()
	#options_update()
pass

#开始按钮指向主场景
func on_play_pressed() -> void:
	ScreenTransition.change_screen("res://场景/主场景/main.tscn")
	pass

#选择按钮指向选择菜单
func on_options_pressed() -> void:
	$OptionsMeau.update_display()
	self.hide()
	pass

#升级按钮指向升级菜单
func on_upgrade_pressed() -> void:
	ScreenTransition.change_screen("res://场景/ui/局外升级页面.tscn")
	pass

#退出按钮指向退出游戏
func on_quit_pressed() -> void:
	self.get_tree().quit()
	pass
